#include "myThread.h"
#include <QtDebug>

MyThread::MyThread()
{
	stopped = false;
}

void MyThread::run()
{
	int i=0;
	while(!stopped)
	{
		qDebug()<<"thread id:"<<QThread::currentThreadId()<<":"<<i;
		i++;
		sleep(2);
	}
	stopped = false;
}

void MyThread::stop()
{
	stopped = true;
}
